#include <stdio.h>
#include <signal.h>
#include <unistd.h>

void handler(int sig);

void handler(int sig)
{
    // signal(sig, handler);
    printf("Receive signal: %d\n", sig);
}

int main(int argc, char const *argv[])
{
    signal(SIGINT, handler);
    signal(SIGALRM, handler);
    while (1)
    {
        sleep(1);
    }
    return 0;
}
